<div class="content-section implementation GridDemo" id="MalfunctionChange" >
    <div class="title col-sm-12">
        <div class="col-sm-1">
            <span>分配故障单</span>
        </div>
        <div class="col-sm-11 pull-right">
            <button type="button"
                    class="pull-right"
                    pButton
                    (click)="goBack()"
                    icon="fa-close"
                    style="width: 30px"></button>
        </div>
    </div>
    <form [formGroup]="myForm" class="form-horizontal">
       <app-base-view></app-base-view>
        <div class="form-group">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>分配至部门：</label>
            <div class="col-sm-4 ui-fluid-no-padding">
                <div class="col-sm-6 ui-fluid ui-fluid-no-padding">
                    <input type="text" pInputText
                           readonly
                           [(ngModel)]="formObj.acceptor_org"
                           formControlName="acceptor"
                           class=" form-control cursor_not_allowed"
                    />
                    <div class="ui-message ui-messages-error ui-corner-all" *ngIf="acceptor">
                        <i class="fa fa-close"></i>
                        不能为空
                    </div>
                </div>
                <div class="col-sm-3 ui-fluid-no-padding ui-padding-10px">
                    <button  ngClass="ui-g-12 ui-fluid-no-padding"  pButton type="button" (click)="showTreeDialog('department')" label="选择"></button>
                </div>
                <div class="col-sm-3 ui-fluid-no-padding ui-padding-10px">
                    <button  ngClass="ui-g-12 ui-fluid-no-padding"  pButton type="button" (click)="clearTreeDialog('department')" label="清空"></button>
                </div>
            </div>
            <label class="col-sm-2 control-label">分配至个人：</label>
            <div class="col-sm-4 ui-fluid-no-padding ui-fluid">
                <p-dropdown [options]="options['departments']"
                            [(ngModel)]="formObj.acceptor"
                            placeholder="{{formObj.acceptor}}"
                            (onChange)="onChange($event)"
                            [ngModelOptions]="{standalone: true}"
                            [style]="{'width':'100%'}"
                ></p-dropdown>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12 ui-no-padding-left-15px ui-no-padding-right-15px">
                <button class="pull-right  ui-button-secondary ui-margin-right-10px" pButton type="button" (click)="goBack()" label="取消" [disabled]="saved"></button>
                <button class="pull-right ui-margin-right-10px" pButton type="button" (click)="submitTrick()" label="提交" [disabled]="hadSaved"></button>
            </div>
        </div>
    </form>
    <p-dialog header="请选择" [(visible)]="display" modal="modal" width="300" [responsive]="true">
        <p-tree [value]="filesTree4"
                selectionMode="single"
                [(selection)]="selected"
                (onNodeExpand)="nodeExpand($event)"
        ></p-tree>
        <!--<div style="margin-top:8px">Selected Node: {{selected ? selected.label : 'none'}}</div>-->
        <p-footer>
            <button type="button" pButton icon="fa-check" (click)="closeTreeDialog()" label="确定"></button>
            <button type="button" pButton icon="fa-close" (click)="display=false"
                    class="ui-button-secondary" label="取消"></button>
        </p-footer>
    </p-dialog>
    <p-growl [(value)]="message"></p-growl>
</div>
